package com.flute.tools.xml;

import org.jdom.Element;

public class NormalXmlNode implements IXmlNode {
	private String nodeName;
	private String value;

	public NormalXmlNode() {
		super();
	}

	public NormalXmlNode(Element element) {
		this.nodeName = element.getName();
		this.value = element.getValue();
	}

	public NormalXmlNode(String nodeName, String value) {
		super();
		this.nodeName = nodeName;
		this.value = value;
	}

	public String getNodeName() {
		return nodeName;
	}

	public void setNodeName(String nodeName) {
		this.nodeName = nodeName;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@Override
	public String toXml() {
		return START_LEFT_ANGLE + nodeName + RIGHT_ANGLE + DATA_START + value
				+ DATA_END + END_LEFT_ANGLE + nodeName + RIGHT_ANGLE;
	}

}
